import request from '../request.js'

// 请求回收订单
function queryRobOrderList(data) {
	return request({
		url: '/order/recycle',
		method: 'GET',
		data
	})
}


// 修改订单状态
function updateOrderStatus(data) {
	return request({
		url: '/order/progress',
		method: 'POST',
		data
	})
}

// 用户取消订单
function removeOrder(data) {
	return request({
		url: '',
		method: 'POST',
		data
	})
}

// 回收员抢单
function grabOrder(data) {
	return request({
		url: '/order/grab',
		method: 'GET',
		data
	})
}

// 完成订单
function finishOrder(data) {
	return request({
		url: '/order/finish',
		method: 'POST',
		data
	})
}

// 用户/回收员订单查询
function queryOrderList(data) {
	return request({
		url:'/order/queryList',
		method: 'GET',
		data
	})
}

// 发布订单
function createOrder(data) {
	return request({
		url: '/order/add',
		method: 'POST',
		data
	})
}

export default {
	queryRobOrderList,
	updateOrderStatus,
	grabOrder,
	finishOrder,
	queryOrderList,
	createOrder,
	removeOrder
}